package com.sistema.escola.infrastructure.persistence.hibernate.util;

import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

public class UpdateDatabase {

    /**
     * @param args
     */
    public static void main(String[] args) {
        configure();
    }

    public static void configure() {
        Configuration cfg = new Configuration();
        cfg.configure("hibernate.cfg.xml");
        SchemaExport schemaExport = new SchemaExport(cfg);
        schemaExport.create(true, true);
//        
//        SessionFactory sessFactory = cfg.buildSessionFactory();
//        Session sess = sessFactory.openSession();
//        Transaction t = sess.beginTransaction();
//        
//        
//        t.commit();
    }

}
